<?xml version="1.0" encoding="UTF-8"?>

<!--
    Document   : shoppingcart.xsl
    Created on : September 20, 2011, 7:50 AM
    Author     : Red Army
    Description:
        Purpose of transformation follows.
-->

<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="html"/>

    <!-- TODO customize transformation rules 
         syntax recommendation http://www.w3.org/TR/xslt 
    -->
    <xsl:template match="//shoppingCart">
        <xsl:for-each select="item">
              <tr>
                <td style="width:25%"><img src="images/carImg/{itemImage}" width="100%" height="100" /></td>
                <td style="width:40%"><xsl:value-of select="itemDescription"></xsl:value-of></td>
                <td style="width:10%"><xsl:value-of select="itemPrice"></xsl:value-of></td>
                <td style="width:5%"><xsl:value-of select="itemQuantity"></xsl:value-of>
                <form action="editCart">
                    <input type="hidden" name="itemID" value="{itemID}" ></input>
                    <input type="hidden" name="itemQuantity" value="{itemQuantity}" ></input>
                    <select name="optNewQuantity">
                        <option selected="selected" >1</option>    
                        <option>2</option>    
                        <option>3</option>    
                        <option>4</option>    
                        <option>5</option>    
                        <option>6</option>    
                        <option>7</option>    
                        <option>8</option>    
                        <option>9</option>    
                        <option>10</option>    
                    </select>
                    <input name="btnAction" type="submit" value="Change Quantity" />
                </form>
                </td>
<!--                <td style="width:10%">40000</td> -->
                <td style="width:5%"><a href="removeCart?itemID={itemID}&amp;itemQuantity={itemQuantity}">Remove</a></td>
              </tr>
        </xsl:for-each>
    </xsl:template>

</xsl:stylesheet>
